package net.zjitc.yaobei_backed.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 短信服务配置类
 */
@Configuration
@ConfigurationProperties(prefix = "sms")
@Data
public class SmsConfig {
    /**
     * 服务商类型: juhe(聚合数据), tencent(腾讯云), console(控制台打印)
     */
    private String provider = "console";
    
    /**
     * 是否启用真实短信发送
     */
    private Boolean enabled = false;
    
    /**
     * 聚合数据配置
     */
    private JuheConfig juhe = new JuheConfig();
    
    /**
     * 腾讯云配置
     */
    private TencentConfig tencent = new TencentConfig();
    
    @Data
    public static class JuheConfig {
        private String apiKey;
        private String templateId;
        private String url = "http://v.juhe.cn/sms/send";
    }
    
    @Data
    public static class TencentConfig {
        private String secretId;
        private String secretKey;
        private String appId;
        private String signName;
        private String templateId;
    }
}

